package com.rykj.energy.database.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.rykj.energy.database.pojo.BasicMeter;
import com.rykj.energy.database.pojo.vo.MeterInfoVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface MeterMapper extends BaseMapper<BasicMeter> {

    IPage<MeterInfoVo> getMeterPages(Page<BasicMeter> page, @Param("orgIds") List<Integer> orgIds, @Param("searchName") String searchName, @Param("meterType") String meterType);

    List<BasicMeter> getShowPageMeters(@Param("orgIds") List<Integer> orgIds);

    Integer selectCountByMap(Map<String, Object> param);

    List<BasicMeter> getPageShowMeters(Map<String, Object> param);

    IPage<BasicMeter> getNotRotationMeters(Page<BasicMeter> page, @Param("orgIds") List<Integer> orgIds, @Param("searchName") String searchName, @Param("meterType") String meterType, @Param("userId") Integer userId);

    List<BasicMeter> getWarnMeters(@Param("orgIds") List<Integer> orgIds);

    IPage<BasicMeter> getMeterForTasks(Page<BasicMeter> page, @Param("orgIds") List<Integer> orgIds, @Param("searchName") String searchName, @Param("meterType") String meterType);

    List<Map<String,Object>> getAlarmValues(@Param("taskId") Integer taskId,@Param("cameraId") Integer cameraId);
}
